package com.lyy.controller;

import com.lyy.result.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Liangyaoyun
 */
@Controller
@RequestMapping(value = "/api/v1/path-variable")
public class PathVariableController {
    @ResponseBody
    @RequestMapping(value = "/exe/{user-id}/{age}" )
    public Object exe(@PathVariable("user-id")Integer userId,
                      @PathVariable("age")Integer age){
        System.out.println(userId);
        System.out.println(age);
        return Result.success(userId+":"+age);
    }
}
